<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<title></title>
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/app.css">
		<style>
			.text{width: 7.5rem !important;height: 2.85rem !important;background: #fff;border: none !important;outline: none !important;padding: 0.48rem 0 0 0.4rem !important;margin: 0 !important;}
			.num{width: 0.88rem;height: 0.24rem;position: absolute;top: 2.99rem;right: 0.41rem;font-size: 0.26rem;line-height: 0.37rem;color: #bfbfbf;}
			.submit{display: block; width: 6rem;height: 0.68rem;background: #117afd;font-size: 0.3rem;color: #fff;border: none;outline: none;border-radius: 0.1rem; margin: 1rem auto;}
			.text::-webkit-input-placeholder {font-size:0.3rem;color: #cccccc;} 
		</style>
	</head>
	<body>
		<textarea type="text" class="text" placeholder="请描述你的问题" id="content"></textarea>
		<div class="num"><span>200</span>字</div>
		<button class="submit" id="submitInfo">提交</button>
	</body>
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/common.js"></script>
	<script src="../../js/app.js"></script>
	<script>
		document.getElementById('submitInfo').addEventListener('tap', function() {
			//反馈内容
			var content = document.getElementById("content").value;
			if(content==null || content==""){
				mui.toast("请输入反馈内容");
				return false;
			}
			if(content.length > 200 ){
				mui.toast("字数长度不得大于200!");
				return false;
			}
           	var param = 'userId='+ getUserId()+'&&content='+ content;			
			utils.ajax('appHttpService/saveFeedBack.do', function(data) {
				data = JSON.parse(data);
				if(data.state == '0' || data.state == 0){//意见反馈成功
					mui.toast(data.msg);
					setTimeout(function() {//0.5秒后跳转到系统设置页面
		            	mui.back();
					}, 500);
				}else if(data.state == '-1' || data.state == -1){//意见反馈保存失败
					mui.toast(data.msg);
				}
			}, param);		  
		})
	</script>
</html>